package a.f.n;

import a.c.d;
import a.c.e;
import a.d.w;
import a.f.wc;
import a.f.zb;
import a.f.zc;

import java.awt.geom.Rectangle2D;
import java.util.Comparator;

public class i
  extends h
  implements bb
{
  public static final byte k = 1;
  public static final byte l = 4;
  public static final byte m = 3;
  public static final byte n = 2;
  private boolean p = false;
  private double q = 40.0D;
  private double r = 40.0D;
  private double s;
  private byte t;
  public static boolean u;
  
  public i()
  {
    this(false, 1.0D, (byte)1, 40.0D, 40.0D);
  }
  
  public i(boolean paramBoolean, double paramDouble1, byte paramByte, double paramDouble2, double paramDouble3)
  {
    this.p = paramBoolean;
    this.q = paramDouble2;
    this.r = paramDouble3;
    c(paramDouble1);
    a(paramByte);
  }
  
  protected byte c(e parame)
  {
    if (!k.n) {}
    return this.p ? 0 : 3;
  }
  
  protected d.a_ a(e parame, byte paramByte)
  {
    boolean bool2 = k.n;
    boolean bool1 = k.m;
    double d1 = this.q * 0.5D;
    double d2 = this.r * 0.5D;
    zc localzc = this.i.d(parame);
    d.a_ locala_1;
    w localw;
    if (parame.e() == 0)
    {
      locala_1 = b(parame);
      if (!bool1) {}
    }
    else
    {
      localw = null;
      locala_1 = b(parame);
      Rectangle2D localRectangle2D = locala_1.b();
      Rectangle2D.Double[] arrayOfDouble = new Rectangle2D.Double[parame.e()];
      Rectangle2D.Double localDouble = new Rectangle2D.Double();
      int i = 0;
      d locald = parame.h();
      e locale;
      d.a_ locala_2;
      Object localObject1;
      Object localObject2;
      do
      {
        if (locald == null) {
          break;
        }
        locale = locald.f();
        locala_2 = a(locale);
        localObject1 = this.i.e(locald);
        ((zb)localObject1).b();
        localObject2 = locala_2.b();
        if (bool1) {
          break label264;
        }
        if (this.p)
        {
          arrayOfDouble[(i++)] = new Rectangle2D.Double(0.0D, 0.0D, ((Rectangle2D)localObject2).getWidth() + this.q, ((Rectangle2D)localObject2).getHeight() + this.r);
          if (bool2) {
            continue;
          }
          if (!bool1) {}
        }
        else
        {
          arrayOfDouble[(i++)] = new Rectangle2D.Double(0.0D, 0.0D, ((Rectangle2D)localObject2).getHeight() + this.r, ((Rectangle2D)localObject2).getWidth() + this.q);
        }
        locald = locald.i();
      } while (!bool1);
      if (!bool2) {
        if (this.p)
        {
          label264:
          wc.a(arrayOfDouble, localDouble, this.s, this.t);
          if (bool2) {
            break label315;
          }
          if (!bool1) {}
        }
        else
        {
          wc.a(arrayOfDouble, localDouble, 1.0D / this.s, this.t);
        }
      }
      label315:
      if (!bool2)
      {
        if (this.p) {
          locala_1.b(-locala_1.i() + localDouble.getX() - d1, -locala_1.j() + localDouble.getY() - d2);
        }
      }
      else
      {
        if (bool2) {
          break label402;
        }
        if (!bool1) {
          break label401;
        }
      }
      locala_1.b(-locala_1.i() + localDouble.getY() - d1, -locala_1.j() + localDouble.getX() - d2);
      label401:
      label402:
      i = 0;
      locald = parame.h();
      label527:
      label530:
      do
      {
        if (locald == null) {
          break;
        }
        locale = locald.f();
        locala_2 = a(locale);
        localObject1 = arrayOfDouble[(i++)];
        if (bool1) {
          break label698;
        }
        if (this.p)
        {
          if (bool2) {
            break label527;
          }
          locala_2.b(-locala_2.g() + ((Rectangle2D.Double)localObject1).x + d1, -locala_2.h() + ((Rectangle2D.Double)localObject1).y + d2);
          if (!bool1) {
            break label530;
          }
        }
        locala_2.b(-locala_2.g() + ((Rectangle2D.Double)localObject1).y + d1, -locala_2.h() + ((Rectangle2D.Double)localObject1).x + d2);
        localObject2 = this.i.e(locald);
        ((zb)localObject2).b();
        if (!bool2)
        {
          if (this.p)
          {
            ((zb)localObject2).a(this.i.r(locald).a, ((Rectangle2D.Double)localObject1).y);
            ((zb)localObject2).a(locala_2.c(), ((Rectangle2D.Double)localObject1).y);
            if (bool2) {
              continue;
            }
            if (!bool1) {}
          }
          else
          {
            ((zb)localObject2).a(((Rectangle2D.Double)localObject1).y, this.i.r(locald).b);
          }
        }
        else {
          ((zb)localObject2).a(((Rectangle2D.Double)localObject1).y, locala_2.d());
        }
        locala_2.a((zb)localObject2);
        locala_2.a(this.i, locald);
        locala_1.a(locala_2);
        locald = locald.i();
      } while (!bool1);
    }
    if ((!bool2) && (parame.d() > 0))
    {
      label698:
      localw = this.i.s(parame.i());
      if (!bool2) {}
      switch (paramByte)
      {
      case 1: 
        locala_1.a(localw.a, locala_1.h() - d2);
        if (!bool2)
        {
          locala_1.e();
          if (!bool1) {
            break;
          }
        }
        break;
      case 2: 
        locala_1.a(locala_1.g() - d1, localw.b);
        locala_1.e();
      }
    }
    return locala_1;
  }
  
  public boolean b()
  {
    return this.p;
  }
  
  public void a(boolean paramBoolean)
  {
    this.p = paramBoolean;
  }
  
  public double c()
  {
    return this.r;
  }
  
  public void a(double paramDouble)
  {
    this.r = paramDouble;
  }
  
  public double d()
  {
    return this.q;
  }
  
  public void b(double paramDouble)
  {
    this.q = paramDouble;
  }
  
  public double e()
  {
    return this.s;
  }
  
  public void c(double paramDouble)
  {
    if (paramDouble <= 0.0D) {
      throw new IllegalArgumentException();
    }
    this.s = paramDouble;
  }
  
  public byte f()
  {
    return this.t;
  }
  
  public void a(byte paramByte)
  {
    this.t = paramByte;
  }
  
  public Comparator a()
  {
    return new j.a_(!b());
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.n.i

 * JD-Core Version:    0.7.0.1

 */